
#ifndef __IOSTREAM__
#define __IOSTREAM__

#include <iostream>
#include <algorithm>

#endif __IOSTREAM__



#ifndef __SELECTIONSORT__
#define __SELECTIONSORT__



using namespace std;


template <typename T>
void selectionSort(T arr[], int n)
{
	for(int i = 0; i < n; ++i)
	{
		int minIndex = i;
		int j;
		for(j = i + 1; j < n; ++j)
			if(arr[j] < arr[minIndex])
				minIndex = j;
		swap(arr[i], arr[minIndex]);
	}
}


#endif __SELECTIONSORT__
